package com.sskj.tibi.presenter;

import com.sskj.common.base.HttpData;
import com.sskj.lib.http.CallBackOption;
import com.sskj.tibi.bean.RechargeBean;
import com.sskj.tibi.http.HttpConfig;
import com.sskj.tibi.ui.fragment.RechargeFragment;


public class RechargeFragmentPresenter extends BasePresenter<RechargeFragment> {

    public void getData() {
        httpService.recharge()
                .execute(new CallBackOption<HttpData<RechargeBean>>() {}
                        .unLoadBind(mView)
                        .execute(httpData -> {
                            if (httpData.getStatus() == HttpConfig.OK) {
                                mView.updateUI(httpData.getData());
                            }
                        }));
    }
}
